{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ce73b6b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.environ['JAVA_HOME'] = \"D:\\\\Develop\\\\Java\\\\jdk1.8.0_241\" # 记得把地址改成自己的\n",
    "os.environ['PYSPARK_PYTHON']=\"C:\\\\Users\\\\Spencer Cheung\\\\.conda\\\\envs\\\\py37\\\\python.exe\"#本机电脑所使用的python编译器的地址"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "5e0939a9",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Spencer Cheung\\.conda\\envs\\py37\\lib\\site-packages\\pyspark\\context.py:317: FutureWarning: Python 3.7 support is deprecated in Spark 3.4.\n",
      "  warnings.warn(\"Python 3.7 support is deprecated in Spark 3.4.\", FutureWarning)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "pyspark.sql.dataframe.DataFrame"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyspark.context import SparkContext\n",
    "from pyspark.sql import SparkSession\n",
    "sc = SparkContext('local','test')\n",
    "from pyspark.sql.functions import explode\n",
    "from pyspark.sql.functions import split\n",
    "spark = SparkSession(sc)\n",
    "sc\n",
    "data_O = spark.read.load('./data/creditcard.csv',format='csv',header='true',inferSchema='true')\n",
    "type(data_O)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0cff433",
   "metadata": {},
   "source": [
    "1.data_0按Class列分组统计每个类别的个数，输出为classFreq，打印classFreq输出为:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d5d99f76",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "+-----+------+\n",
      "|Class| count|\n",
      "+-----+------+\n",
      "|    1|   492|\n",
      "|    0|284315|\n",
      "+-----+------+\n",
      "\n"
     ]
    }
   ],
   "source": [
    "#此处由考生填写\n",
    "classFreq = data_O.groupby('Class').count()\n",
    "#此处由考生填写\n",
    "classFreq.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "cba1e2c5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(984, 31)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 欺诈样本492行\n",
    "import pandas as pd\n",
    "data = data_O.toPandas()\n",
    "data = data.sample(frac=1)\n",
    "fraud_df = data.loc[data['Class'] == 1]\n",
    "non_fraud_df = data.loc[data['Class'] == 0][:492]\n",
    "normal_distributed_df = pd.concat([fraud_df,non_fraud_df])\n",
    "new_df = normal_distributed_df.sample(frac=1,random_state=42)\n",
    "new_df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "dfdb4e75",
   "metadata": {},
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "colors = ['#B3F9C5','#f9c5b3']"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c2dfb460",
   "metadata": {},
   "source": [
    "2.以Class为x轴，V10为y轴，绘制箱线图，用于查看new_df数据集中V10变量在不同班级之间的分布情况。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "c2184721",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj4AAAHHCAYAAAC/R1LgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/NK7nSAAAACXBIWXMAAA9hAAAPYQGoP6dpAABA10lEQVR4nO3deVxV1f7/8fcBheMAOEDgAI6VQ5pmiqKmltehm/5scIJyyLxd03JOvZZTg3VNzMyr1S31exOnyqEBh7qWGaaYUWaZmQPigIoJTqDC+v3R1/P1CDjDPpz9ej4e5/HwrLXP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XSaqlWrmr59++a7b2OMOX36tClXrpypVauWaz+Xs3btWiPJrF271tW2bt0688gjj5jw8HDj5+dnKleubIYMGZLrszp48KDp06ePqVSpkvHz8zNhYWGmc+fOZvfu3a5trucYjDGmVatWpm7dumbSpElGkvnuu+9cfbt37zaSzJQpU9xe88cff5jBgwebypUrGz8/P1OjRg3zyiuvmOzsbLftjh49ah599FETEBBggoKCTK9evUxSUpKRZObMmePa7ocffjC9e/c21apVM/7+/iY0NNT07dvXHD161LXN+PHjjaRcjwufQZUqVUzv3r1dn4UkM3fu3FzHu3LlSiPJfPzxx662lJQU07dvX3PLLbcYPz8/U6dOHfPuu+9e8bPbt2+fKVasmPnLX/5yxW0v2LJli+nQoYMJCAgwpUqVMvfee6/ZsGGD2zZz5swxksyXX35pBgwYYEJCQkyZMmWMMf/39dq8ebNp2bKlKVGihBk8eLAxxpjMzEwzbtw4U6NGDdf308iRI01mZqbb/i/+rIwxJi0tzQwfPtzccccdplSpUiYgIMB06NDBJCUluba58P176ePC17F3796mSpUqbu9z8uRJM2zYMNf3yW233WamTJlicnJy3LaTZAYOHGiWLl1q6tat6/oaxMfHX/XniqLF8/8cBK4gJiZG8+bN0+LFizVo0CBX+7Fjx7Rq1Sr17NlTJUqUuOb9fv/997rtttsUGBjo1t6kSRNJUlJSksLDw/N8bffu3TVz5kx9+umn6tq1q6v99OnT+vjjj9WnTx/5+vrq8OHDateunUJCQjR69GiVKVNGe/bs0UcffXTZ2tavX69jx45pyJAh8vX1veZjk6QlS5bo9OnTGjBggMqXL69NmzZpxowZSklJ0ZIlS1zbPfzww9q2bZuefvppVa1aVYcPH9aaNWuUnJzsen49x3CxwYMHa9q0aZowYcJlR31Onz6tVq1aaf/+/XryyScVERGhhIQEjRkzRgcPHtTrr78uScrJyVGnTp20adMmDRgwQLVq1dLy5cvVu3fvXPtcs2aNdu3apb59+yosLEzbtm3T22+/rW3btunbb7+Vw+HQQw89pB07dmjBggWaNm2agoODJUkhISG59nf33XerevXqWrx4ca73W7RokcqWLav27dtLklJTU9W0aVM5HA4NGjRIISEhio+PV79+/ZSRkZFrFOdi8fHxOn/+vB577LErfbySpG3btqlly5YKDAzUs88+q+LFi+utt95S69at9dVXXykyMtJt+6eeekohISEaN26cTp065WpPS0tTx44d1aNHDz366KMKDQ1VTk6OOnfurPXr1+tvf/ubateura1bt2ratGnasWOHli1blm9du3bt0rJly9S1a1dVq1ZNqampeuutt9SqVSv9/PPPqlixomrXrq1JkyZp3Lhx+tvf/qaWLVtKkqKiovLcpzFGnTt31tq1a9WvXz81aNBAq1at0siRI7V///5cI2Hr16/XRx99pKeeekoBAQF644039PDDDys5Odl1ihxexOrkBdyo8+fPmwoVKphmzZq5tc+ePdtIMqtWrcr3tZcb8albt6659957c7Vv27bNSDKzZ8/Od785OTmmUqVK5uGHH3ZrX7x4sZFk1q1bZ4wxZunSpUaSSUxMzHdfeZk+fbqRZJYuXXpV2+c14pPXKNjkyZONw+Ewe/fuNcb8ObqiPEZdLna9x2DM/40gGGPMxIkT3UZ98hrxeeGFF0ypUqXMjh073PYzevRo4+vr6xqF+/DDD40k8/rrr7u2yc7ONvfee2+uEZ+8PocFCxa4fZ2MMWbKlCluozwXu3QUY8yYMaZ48eLm2LFjrrasrCxTpkwZ8/jjj7va+vXrZypUqOA2umTMn6OCQUFB+Y5UGmPM0KFDjSTz/fff57vNxbp06WL8/PzM77//7mo7cOCACQgIMPfcc4+r7cKIT4sWLXKNJrZq1SrP7/3//Oc/xsfHx3z99ddu7Rd+Br/55htX26WfVWZmZq7Rut27dxt/f38zadIkV9uFkbSLv3YXXDris2zZMiPJvPjii27bPfLII8bhcJidO3e62iQZPz8/t7YffvjBSDIzZszI9V4o+ri4GUWer6+vevTooQ0bNmjPnj2u9ri4OIWGhuq+++67rv2eOXMmz2s3nE6nqz8/DodDXbt21WeffaaTJ0+62hctWqRKlSqpRYsWkqQyZcpI+vPi3nPnzl11bRkZGZKkgICAq37NpS4eBTt16pSOHj2qqKgoGWP0/fffu7bx8/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AA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2EYxqwsAAG+Tle2QZKwuw9aMkc7m/PlvPx/J4bC2Hjv78+fBcxB8AOAmG7S+nNUlAMgHp7oAAIBtMOIDADeB0+lUfHy81WXgf2VmZurBBx+UJC1dulROp9PiiiDJI74OBB8AuAkcDodKlChhdRnIg9Pp5GsDF051AQAA2yD4AAAA2yD4AAAA2yD4AAAA27iui5vT09N16NAhSVJYWJiCgoJualEAAAAF4ZpGfP7973+rTp06KleunOrUqeP273fffbegagQAALgprnrEZ8qUKZowYYKeeeYZtW/fXqGhoZKk1NRUrV69WoMHD9Yff/yhESNGFFixAAAAN+Kqg8+bb76pOXPmqFu3bm7ttWvXVuvWrXXnnXdq5MiRBB8AAOCxrvpU1+HDh1WvXr18++vVq6ejR4/elKIAAAAKwlUHn8aNG+uVV17R+fPnc/VlZ2fr1VdfVePGjW9qcQAAADfTNZ3qat++vcLCwnTPPfe4XeOzbt06+fn5afXq1QVWKAAAwI266hGf+vXra8eOHXrhhRcUEBCgXbt2adeuXQoICNCLL76o7du364477ijIWgEAAG7INc3jExAQoAEDBmjAgAEFVQ8AAECBuWkzN587d07Jyck3a3cAAAA33U0LPj///LOqVat2s3YHAABw07FWFwAAsI2rvsbnrrvuumz/mTNnbrgYoLAlJCRo+vTpGjx4sKKioqwuBwBQwK46+Pz888/q0aNHvqezDh48qB07dty0wi710ksv6dNPP1VSUpL8/Px0/PjxXNskJydrwIABWrt2rUqXLq3evXtr8uTJKlbsutZihZfLzMxUbGysjh49qtjYWN11111yOp1WlwUAKEBXnQjuuOMORUZG5ntHV1JSkt55552bVtilzp49q65du6pZs2Z5LoianZ2tv/71rwoLC1NCQoIOHjyoXr16qXjx4nr55ZcLrC4UXfPnz1daWpokKS0tTXFxcXr88cctrgoAUJCu+hqf5s2b69dff823PyAgQPfcc89NKSovEydO1NChQ/NdNmP16tX6+eef9f7776tBgwbq2LGjXnjhBc2cOVNnz54tsLpQNKWkpCguLk7GGEmSMUZxcXFKSUmxuDIAQEG66uDTv39/vf766/n216hRQ2vXrr0ZNV2XDRs2qF69eq4ZpSWpffv2ysjI0LZt2/J9XVZWljIyMtwe8G7GGE2fPj3f9gthCADgfa5p5uamTZvqnXfe0YkTJwqyputy6NAht9AjyfX80KFD+b5u8uTJCgoKcj3Cw8MLtE5YLzk5WYmJicrOznZrz87OVmJiIvNRAYAXu+rg89VXX6lOnToaPny4KlSooN69e+vrr7++oTcfPXq0HA7HZR/bt2+/ofe4kjFjxig9Pd312LdvX4G+H6wXERGhxo0by9fX163d19dXTZo0UUREhEWVAQAK2lUHn5YtW+q9997TwYMHNWPGDO3Zs0etWrXSbbfdpldfffWyoyr5GT58uH755ZfLPqpXr35V+woLC1Nqaqpb24XnYWFh+b7O399fgYGBbg94N4fDocGDB+fb7nA4LKgKAFAYrnkCw1KlSqlv37766quvtGPHDnXt2lUzZ85URESEOnfufE37CgkJUa1atS778PPzu6p9NWvWTFu3btXhw4ddbWvWrFFgYKDq1KlzTXXB+1WuXFnR0dGukONwOBQdHa1KlSpZXBkAoCDd0MzNNWvW1D/+8Q8999xzCggI0Keffnqz6solOTlZSUlJSk5OVnZ2tpKSkpSUlKSTJ09Kktq1a6c6deroscce0w8//KBVq1bpueee08CBA+Xv719gdaHoiomJUfny5SVJwcHBio6OtrgiAEBBu+7gs27dOvXp00dhYWEaOXKkHnroIX3zzTc3szY348aNU8OGDTV+/HidPHlSDRs2VMOGDbV582ZJf16f8cknn8jX11fNmjXTo48+ql69emnSpEkFVhOKNqfTqWHDhik0NFRDhw5l8kIAsAGHuYZ7dw8cOKC5c+dq7ty52rlzp6KiotSvXz9169ZNpUqVKsg6C01GRoaCgoKUnp7O9T4AUESdOXNGHTt2lCTFx8erRIkSFleEgna1v7+veubmjh076vPPP1dwcLB69eqlxx9/XLfffvtNKRYAAKAwXHXwKV68uD744AM98MADuW4DBgAAKAquOvisWLGiIOsAAAA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VaqUfv75Z5UuXbrAjhFAwSP4ACgSdu7cKWOMatWqdU2ve+6551z/rlq1qkaMGKGFCxe6gk9ycrJGjhzp2u+tt97q2j45OVkPP/yw6tWrJ0mqXr36jR4GAItxqgtAkWCMua7XLVq0SM2bN1dYWJhKly6t5557TsnJya7+YcOG6YknnlDbtm31yiuv6Pfff3f1PfPMM3rxxRfVvHlzjR8/Xj/++OMNHwcAaxF8ABQJt956qxwOxzVdwLxhwwbFxMTo/vvv1yeffKLvv/9eY8eO1dmzZ13bTJgwQdu2bdNf//pX/fe//1WdOnW0dOlSSdITTzyhXbt26bHHHtPWrVt19913a8aMGTf92AAUHoe53j+jAKCQdezYUVu3btWvv/6a6zqf48ePq0yZMnI4HFq6dKm6dOmiqVOn6l//+pfbKM4TTzyhDz74QMePH8/zPXr27KlTp05pxYoVufrGjBmjTz/9lJEfoAhjxAdAkTFz5kxlZ2erSZMm+vDDD/Xbb7/pl19+0RtvvKFmzZrl2v7WW29VcnKyFi5cqN9//11vvPGGazRHks6cOaNBgwbpyy+/1N69e/XNN98oMTFRtWvXliQNGTJEq1at0u7du7VlyxatXbvW1QegaOLiZgBFRvXq1bVlyxa99NJLGj58uA4ePKiQkBA1atRIs2bNyrV9586dNXToUA0aNEhZWVn661//queff14TJkyQJPn6+iotLU29evVSamqqgoOD9dBDD2nixImSpOzsbA0cOFApKSkKDAxUhw4dNG3atMI8ZAA3Gae6AACAbXCqCwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2AbBBwAA2Mb/B5feRJ+kTrgLAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#此处由考生填写\n",
    "V10_sns = sns.boxplot(x=\"Class\",y=\"V10\",data=new_df)\n",
    "#此处由考生填写\n",
    "V10_sns.set_title('V10 vs Class Negative Correlation')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "f39113c2",
   "metadata": {},
   "outputs": [],
   "source": [
    "dfff = spark.createDataFrame(new_df)\n",
    "from pyspark.sql.functions import *\n",
    "from pyspark.sql.window import Window"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fb2765f1",
   "metadata": {},
   "source": [
    "3.运用withColumn将dfff添加一列idx,该列是按窗口win中的Time字段排序后的行号row_number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "30750abb",
   "metadata": {},
   "outputs": [],
   "source": [
    "win = Window().orderBy('Time')\n",
    "#此处由考生填写\n",
    "dfff = dfff.withColumn(\"idx\",row_number().over(win))\n",
    "#此处由考生填写\n",
    "from pyspark.ml import Pipeline\n",
    "from pyspark.ml.classification import GBTClassifier\n",
    "from pyspark.ml.feature import VectorIndexer,VectorAssembler\n",
    "from pyspark.ml.evaluation import BinaryClassificationEvaluator\n",
    "from pyspark.ml.linalg import DenseVector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "0ee36fc8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pyspark.sql.dataframe.DataFrame"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(dfff)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "883a6763",
   "metadata": {},
   "source": [
    "4.将dfff中的rdd映射为元组，元组中只有一个元素DenseVector,DenseVector的第一个值由dfff的前30列组成，第二个值为dfff的31列，第三个值为dfff的第32列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "eadf2367",
   "metadata": {},
   "outputs": [],
   "source": [
    "#此处由考生填写\n",
    "#无法联想\n",
    "training_df = dfff.rdd.map(lambda x: (DenseVector(x[0:29]),x[30],x[31]))\n",
    "#此处由考生填写"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "8c15dcc4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pyspark.rdd.PipelinedRDD"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(training_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "ea72f62e",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "training_df = spark.createDataFrame(training_df,[\"features\",\"label\",\"index\"])\n",
    "training_df = training_df.select(\"index\",\"features\",\"label\")\n",
    "# training_df.show(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "0f77894e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "86 97 6 13\n"
     ]
    }
   ],
   "source": [
    "train_data,test_data = training_df.randomSplit([.8,.2],seed=1234)\n",
    "gbt = GBTClassifier(featuresCol=\"features\",maxIter=100,maxDepth=8)\n",
    "model =gbt.fit(train_data)\n",
    "predictions = model.transform(test_data)\n",
    "evaluator = BinaryClassificationEvaluator()\n",
    "evaluator.evaluate(predictions)\n",
    "tp = predictions[(predictions.label ==1) & (predictions.prediction ==1)].count()\n",
    "tn = predictions[(predictions.label ==0) & (predictions.prediction ==0)].count()\n",
    "fp = predictions[(predictions.label ==0) & (predictions.prediction ==1)].count()\n",
    "fn = predictions[(predictions.label ==1) & (predictions.prediction ==0)].count()\n",
    "print(tp,tn,fp,fn)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ee3aac1",
   "metadata": {},
   "source": [
    "5.打印召回率和精确率"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "c5d2ac2a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "recall: 0.8686868686868687\n",
      "Precision: 0.9347826086956522\n"
     ]
    }
   ],
   "source": [
    "#此处由考生填写\n",
    "print(\"Recall: \",tp/(tp+fn))\n",
    "print(\"Precision: \",tp/(tp+fp))\n",
    "#此处由考生填写"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f9ea6092",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
